Conversation
radu-mocanu
commented
Jan 22, 2026
- resume runtime on fired triggers
29cd15f to
740e611
Compare
There was a problem hiding this comment.
Pull request overview
Adds “auto-resume” behavior to the resumable runtime so that if resume triggers are already fired at the time of suspension, the runtime immediately resumes without requiring an external resume call.
Changes:
- Implement auto-resume flow in
UiPathResumableRuntime.execute()and.stream()when fired triggers are detected. - Introduce
UiPathSuspensionResultto carry both the suspensionUiPathRuntimeResultand any fired trigger resume-map. - Add async tests covering auto-resume scenarios (none/partial/all fired; multiple auto-resumes; stream behavior).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/uipath/runtime/resumable/runtime.py |
Adds fired-trigger detection at suspension time and recursive auto-resume for execute() and stream(). |
src/uipath/runtime/result.py |
Adds UiPathSuspensionResult model used to return both runtime result and fired trigger map. |
tests/test_resumable.py |
Adds coverage for auto-resume behavior across several trigger-firing patterns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8424ccb to
c360384
Compare
c360384 to
f88511b
Compare
f88511b to
abef1a7
Compare
| final_result = event | ||
| else: | ||
| yield event | ||
| while True: |
There was a problem hiding this comment.
execution_completed = False
while not execution_completed
and change the return with
execution_completed = True
I remember issues with returning during a while loop in an async generator
| if final_result: | ||
| suspension_result = await self._handle_suspension(final_result) | ||
|
|
||
| if suspension_result.status != UiPathRuntimeStatus.SUSPENDED or not ( |
There was a problem hiding this comment.
We either use is_suspended everywhere or just check for UiPathRuntimeStatus everywhere (I would incline towards the latter in this low-level concepts)
There was a problem hiding this comment.
good catch, forgot to replace it here.
I would rollback to the UiPathRuntimeStatus check to keep the runtime more explicit